<?php

use yii\helpers\Html;
use yii\grid\GridView;
use common\components\grid\GridView2015;
use ms\modules\article\models\ArticleNav;
use ms\modules\article\models\ArticleInfo;
/* @var $this yii\web\View */
/* @var $searchModel ms\modules\article\models\searchs\SearchArticleInfo */
/* @var $dataProvider yii\data\ActiveDataProvider */

$this->title = '公告文章';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="article-info-index">
    <?= GridView2015::widget([
        'dataProvider' => $dataProvider,
        'filterModel' => $searchModel,
        'title'=>$this->title,
        'columns' => [
            [
            	'class' => 'common\components\grid\CheckboxColumn2015'],
            	'id',
            	'title',
            	'type',
            [
            	'filter' =>ArticleNav::getAllNav(),
	            'attribute'=>'nav_id',
	            'value'=>function ($searchModel) {return ArticleNav::getNavName($searchModel->nav_id);}
            ],
            'type',
//             'content:ntext',
//             'abstract:ntext',
            'author',
            // 'img_id',
            'click_num',
            [
            	
	            'attribute' => 'status',
            	'filter' =>['0'=>'失效','1'=>'生效'],
	            'value'=>function($searchModel){ return ArticleInfo::getInfoStatus($searchModel->status);},
            ],
            
            // 'icon',
            'publish_time:datetime',
            
            ['class' => 'yii\grid\ActionColumn'],
        ],
    ]); ?>

</div>
